package designPatterns.P04_建造者模式_Builder.第2版_使用建造者;

import designPatterns.P04_建造者模式_Builder.第2版_使用建造者.builders.CommonHouseBuilder;
import designPatterns.P04_建造者模式_Builder.第2版_使用建造者.builders.HighHouseBuilder;

public class P01 {
    public static void main(String[] args) {
        CommonHouseBuilder commonHouseBuilder = new CommonHouseBuilder();
        HouseDirector director = new HouseDirector();
        director.setBuilder(commonHouseBuilder);
        House commonHouse = director.build();
        System.out.println(commonHouse);

        director.setBuilder(new HighHouseBuilder());
        House highHouse = director.build();
        System.out.println(highHouse);
    }
}
